define([
        'jquery'
   
        ], function ($){
	

	var JoinView = function() {};
	
	JoinView.prototype = {
			drawing : function() {		
		
				var $mainDiv = $('#main');
				var $joinFormDiv = $('<form id = "joinForm"></form>');

				$mainDiv.html("");
				$mainDiv.append($joinFormDiv[0]);

				var label1 = "<label>아이디 &nbsp;</label>";
				$joinFormDiv.append(label1);  //폼, 라벨 추가
				$('<input>',{type : "text", id : "id"}).appendTo($joinFormDiv);

				var label2 = "<br><label>비밀번호 &nbsp;</label>";
				$joinFormDiv.append(label2);
				$('<input>',{type : "password", id : "password1"}).appendTo($joinFormDiv);

				var label3 = "<br><label>비밀번호 재입력 &nbsp;</label>";
				$joinFormDiv.append(label3);
				$('<input>',{type : "password", id : "password2"}).appendTo($joinFormDiv);

				var label4 = "<label><br>이름 &nbsp;</label>";
				$joinFormDiv.append(label4);  //폼, 라벨 추가
				$('<input>',{type : "text", id : "name"}).appendTo($joinFormDiv);

				var label5 = "<label><br>나이 &nbsp;</label>";
				$joinFormDiv.append(label5);  //폼, 라벨 추가
				$('<input>',{type : "number", id : "age", max : "3"}).appendTo($joinFormDiv);

				this.$input1 = $('<input>',{type : "button", value : '회원가입', class : "button"}).appendTo($joinFormDiv);
				$('<input>',{type : "reset", value : '다시작성', class : "button"}).appendTo($joinFormDiv);  //버튼
				this.$input2 = $('<input>',{type : "button", value : '취소', class : "button"}).appendTo($joinFormDiv);
			
			},
			setJoinEvent : function(func) {
				
				this.$input1.on('click', func);
			},
			
			setCancelEvent : function(func) {
				
				this.$input2.on('click', func);
			}
	};
	

	
	
	return	JoinView;
	
});
